/***********************************************
 * Filename:  		CGame.h
 * Date:      		???
 * Mod. Date: 		???
 * Mod. Initials:	JDCG
 * Author:    		Ja'Michael D. Garcia
 * Purpose:   		
 ************************************************/

#ifndef _CGAME_H_
#define _CGAME_H_

#include "..//State System/IGameState.h"
#include <vector>
#include <Windows.h>
#include "../Timer.h"

//	Forward Decleration
class CRenderer;

class CGame
{
private:
	std::vector< IGameState* > m_vStates;

	CGame(void);
	CGame( const CGame& );
	CGame& operator=(const CGame&);
	~CGame(void) {}
	bool Input(void);
	void Update(void);
	void Render(float fElapsedTime);

	//	Data Members
	CTimer		m_Timer;
	CRenderer*	m_pRenderer;

	int		m_nWindowWidth;
	int		m_nWindowHeight;
	bool	m_bWindowMode;
	//HWND	m_hwndGame;

public:
	static CGame* GetInstance(void);
	void Shutdown(void);
	void Initialize( HWND hWnd, HINSTANCE hInstance, int nScreenWidth, 
		int nScreenHeight, bool bIsWindowed );

	void PushState(IGameState* pNewState, bool bExitState = true );
	void PopState( bool bEnterState = true );
	bool LogicLoop( void );

	// Accessors
	CTimer* GetTimer() {return &m_Timer;}
};

#endif